package org.itboys.mobile.dto;

import java.util.List;

/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 联系方式 ：empty90911@126.com
 * 描述：圣代_关联_权限_DTO。
 *
 */

public class SundayPermissionDto {
    private Long id;//主键ID
    private String name;//名称
    private Long parentId;//分类的父一级ID,或商品的分类Id.
    private String standard;//规格。针对商品
    private Integer type;//1商品，2分类。
    private Integer store;//库存数量。针对商品
    private Double price;//价格。针对商品

    private List<SundayPermissionDto> children;
    private Long permissionId;//权限ID
    public SundayPermissionDto() {

    }

    public SundayPermissionDto(Long id, String name, Long parentId, String standard, Integer type, Integer store, Double price,Long permissionId) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.standard = standard;
        this.type = type;
        this.store = store;
        this.price = price;
        this.permissionId = permissionId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getStandard() {
        return standard;
    }

    public void setStandard(String standard) {
        this.standard = standard;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStore() {
        return store;
    }

    public void setStore(Integer store) {
        this.store = store;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public List<SundayPermissionDto> getChildren() {
        return children;
    }

    public void setChildren(List<SundayPermissionDto> children) {
        this.children = children;
    }

    public Long getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Long permissionId) {
        this.permissionId = permissionId;
    }

    public  boolean getExpanded(){
        if(children!=null&&children.size()>0){
            return true;
        }else{
            return false;
        }
    }
}
